<%--
  Created by IntelliJ IDEA.
  User: 1234
  Date: 2018/5/3
  Time: 14:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>ལམ་ཐིག་སྟག་རིས་ཅན་རྒྱུགས་ལེན།</title>
</head>
<body>

</body>
<script src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/static/layer/layer.js"></script>
<script>
    $(function () {
        var type = ${type};
        if (type == 2) {
            //根据套题获取数据
            var seidsString = "${seids}";
            var radom = "${radom}";
            var seids = [];
            var s = seidsString.split("|");
            $.each(s, function (i, e) {
                console.info(e);
                seids.push(e);
            });
            var initTest = new Object();
            initTest.seids = seids;
            initTest.type = radom;
            $.ajax({
                contentType: 'application/json;charset=UTF-8',
                type: 'PUT',
                dataType: "json",
                data: JSON.stringify(initTest),
                url: '/temprorary/select',
                success: function (result) {
                    console.info(result);
                }
            });
        } else if (type == 3) {
            //获取错题数据
            $.get("/error", {}, function (msg) {
                console.info(msg);


            }, "json");
        }
        else if (type == 4) {
            //获取继续做题数据
            $.get("/temprorary/continue", {}, function (msg) {
                console.info(msg);


            }, "json");
        } else if (type == 1) {
            //获取模拟考试数据
            var courseId = "${courseId}";
            var number = "${number}";//身份证号
            $.get("/temprorary/moni", {courId: courseId, number: number}, function (msg) {
                console.info(msg);


            }, "json");
        }
    });
</script>
</html>
